home *** CD-ROM | disk | FTP | other *** search
- // Initialisation de EasyGadgets
- // (C) Christophe PASSUELLO
- // Fri Jan 22 14:19:51 1993
-
-
- #include <exec/types.h>
- #include <exec/memory.h>
- #define INTUITION_PREFERENCES_H 0
- #include <intuition/intuition.h>
- #include "IObject_priv.h"
-
-
- // definition de l'image du cycle
- const static UWORD CycleData[]=
- {
- 0x7C00, 0xC600, 0xC600, 0xDF80, 0xCF00, 0xC600, 0xC000, 0xC000, 0xC600, 0x7C00
- };
-
- struct Image CycleImage=
- {
- 5, 2,
- 9, 10, 1,
- NULL,
- 1,0,
- NULL
- };
-
-
- // Image pour le check
- const static UWORD CheckData[]=
- {
- 0x000e, 0x0018, 0x0030, 0x0060, 0xf0c0, 0x3980, 0x1f00, 0x0e00
- };
-
- struct Image CheckImage=
- {
- 4, 2,
- 15, 8, 1,
- NULL,
- 1, 0,
- NULL
- };
-
-
- //
- // Mets les images en CHIP-RAM
- //
- BOOL InitEasyGadget()
- {
- UWORD *image;
-
- // Mets le cycle en memoire
- if (image = (UWORD *) AllocMem( sizeof(CycleData), MEMF_CHIP))
- {
- CycleImage.ImageData = image;
- memcpy(image, CycleData, sizeof(CycleData));
- }
- else
- return (FALSE);
-
- // mets le checkImage en CHIP
- if (image = (UWORD *) AllocMem( sizeof(CheckData), MEMF_CHIP))
- {
- CheckImage.ImageData = image;
- memcpy(image, CheckData, sizeof(CheckData));
- }
- else
- return (FALSE);
-
- return (TRUE);
- }
-
-
- //
- // Libere les images
- //
- VOID ExitEasyGadget()
- {
- if (CycleImage.ImageData) FreeMem(CycleImage.ImageData, sizeof(CycleData));
- if (CheckImage.ImageData) FreeMem(CheckImage.ImageData, sizeof(CheckData));
- }
-